<?php
header('Content-Type: text/html; charset=utf-8');


//加载fastpay文件
if (!function_exists('get_openid')) {
require $_SERVER['DOCUMENT_ROOT'].'/fastpay/Fast_Cofig.php';
}


//fastpay获取用户信息
//此接口需要联系客服开通
$userinfo=get_openid_info($_GET);//参数为必须为get数组
$userinfo=json_decode($userinfo,true);



$openid =$userinfo['openid'];//用户的openid
$nickname =$userinfo['nickname'];//用户昵称
$headimgurl = $userinfo['headimgurl'];//用户头像

$sex	     = $userinfo['sex	'];//性别
$province  = $userinfo['province'];//省份
$city      = $userinfo['city'];//城市
$country   = $userinfo['country'];//国家，如中国为CN
$privilege   = $userinfo['privilege'];//用户特权信息，json 数组，如微信沃卡用户为
print_r($userinfo);
